//---------------------------------------------------------------------------

#ifndef uMailClientH
#define uMailClientH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "dxBar.hpp"
#include <ComCtrls.hpp>
#include "cxClasses.hpp"
#include <ImgList.hpp>
#include <ActnList.hpp>
#include <ExtCtrls.hpp>
#include "Main.h"
#include "cxControls.hpp"
#include "cxGraphics.hpp"
#include "cxLookAndFeelPainters.hpp"
#include "cxLookAndFeels.hpp"
#include "cxPC.hpp"
#include <Grids.hpp>
#include "cxCustomData.hpp"
#include "cxData.hpp"
#include "cxDataStorage.hpp"
#include "cxDBData.hpp"
#include "cxEdit.hpp"
#include "cxFilter.hpp"
#include "cxGrid.hpp"
#include "cxGridCustomTableView.hpp"
#include "cxGridCustomView.hpp"
#include "cxGridDBTableView.hpp"
#include "cxGridLevel.hpp"
#include "cxGridTableView.hpp"
#include "cxStyles.hpp"
#include <DB.hpp>
#include "DMJ.h"
#include "cxImageComboBox.hpp"
#include "uException.hpp"
#include "cxSplitter.hpp"
#include "IniFiles.hpp"
#include "cxTextEdit.hpp"
#include "DBAccess.hpp"
#include "IBC.hpp"
//---------------------------------------------------------------------------
class TfrMailClient : public TForm
{
__published:	// IDE-managed Components
	TdxBarManager *brMail;
	TStatusBar *sbMain;
	TdxBar *brbPanel;
	TdxBar *brbMenu;
	TdxBarSubItem *sitmBox;
	TdxBarButton *itmNewBox;
	TImageList *ilSmall;
	TImageList *ilLarge;
	TdxBarLargeButton *lbtnReceive;
	TdxBarLargeButton *lbtnSend;
	TdxBarButton *itmDelBox;
	TdxBarButton *itmPropertyBox;
	TdxBarLargeButton *lbtnProperty;
	TdxBarButton *itmReceiveRUPS;
	TdxBarButton *itmReceiveERIP;
	TdxBarButton *itmSendRUPS;
	TdxBarButton *itmSendERIP;
	TdxBarSubItem *sitmFile;
	TActionList *alMain;
	TPanel *pnlMain;
	TdxBarLargeButton *lbtnNewBox;
	TPanel *pnlTop;
	TPanel *pnlBottom;
	TPanel *pnlFiles;
	TIBCDataSource *dsBoxes;
	TcxSplitter *splTop;
	TPanel *pnlRight;
	TcxPageControl *pgcFiles;
	TcxTabSheet *tabMain;
	TcxGrid *grdPost;
	TcxGridDBTableView *grdvwPost;
	TcxGridDBColumn *grdvwPostFName;
	TcxGridDBColumn *grdvwPostFKodBank;
	TcxGridDBColumn *grdvwPostFDate;
	TcxGridDBColumn *grdvwPostFNumber;
	TcxGridDBColumn *grdvwPostFDateTime;
	TcxGridDBColumn *grdvwPostFSumOpl;
	TcxGridDBColumn *grdvwPostFSumUsl;
	TcxGridLevel *grdlvlPost;
	TcxTabSheet *tabSending;
	TcxTabSheet *tabOther;
	TcxTabSheet *tabService;
	TPanel *pnlLeft;
	TcxSplitter *splLeft;
	TcxGridLevel *grdAccountsLevel;
	TcxGrid *grdAccounts;
	TcxGridTableView *grdAccountsView;
	TcxGridColumn *clmName;
	TcxGridColumn *clmId;
	void __fastcall lbtnReceiveClick(TObject *Sender);
	void __fastcall FormShow(TObject *Sender);
	void __fastcall FormKeyPress(TObject *Sender, char &Key);
	void __fastcall grdAccountsViewFocusedRecordChanged(
          TcxCustomGridTableView *Sender,
          TcxCustomGridRecord *APrevFocusedRecord,
          TcxCustomGridRecord *AFocusedRecord,
          bool ANewItemRecordFocusingChanged);
	void __fastcall clmNameCustomDrawCell(TcxCustomGridTableView *Sender,
          TcxCanvas *ACanvas, TcxGridTableDataCellViewInfo *AViewInfo,
          bool &ADone);
	void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
	void __fastcall lbtnPropertyClick(TObject *Sender);
private:	// User declarations
	void __fastcall GetAccounts();
	int GetIconIndexBySectionName(AnsiString ASection);
	AnsiString GetIDBySectionName(AnsiString ASection);
public:		// User declarations
	__fastcall TfrMailClient(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TfrMailClient *frMailClient;
//---------------------------------------------------------------------------
#endif
